aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/invoice
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-02-22 13:35:50 -0800
committerAdam Soltys <[email protected]>2024-02-22 13:35:50 -0800
commit8d33c5fe90f731f0c4326ca787cb1150ac46fcd9 (patch)
treeb2c8696826ec6c5314bfa5ea64cb76ce7f87cbd4 /src/routes/(app)/[username]/invoice
parent5be878fdbb5052501bf894b45627a7bd209ff053 (diff)
downloadcoinos-ui-8d33c5fe90f731f0c4326ca787cb1150ac46fcd9.tar.gz
coinos-ui-8d33c5fe90f731f0c4326ca787cb1150ac46fcd9.zip
send to tip page
Diffstat (limited to 'src/routes/(app)/[username]/invoice')
-rw-r--r--src/routes/(app)/[username]/invoice/[id]/+page.svelte14
-rw-r--r--src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte3
2 files changed, 11 insertions, 6 deletions
diff --git a/src/routes/(app)/[username]/invoice/[id]/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/+page.svelte
index dca98c39..56feced6 100644
--- a/src/routes/(app)/[username]/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/[username]/invoice/[id]/+page.svelte
@@ -51,7 +51,6 @@
user: { username, currency },
} = invoice;
-
let qr;
let tipPercent = 0;
@@ -93,7 +92,7 @@
let subbed;
onMount(async () => {
- $showQr = $showQr && 1
+ $showQr = $showQr && 1;
if (browser) {
last.subscribe((v) => {
if (!v || subbed) return;
@@ -146,7 +145,10 @@
{#each invoice.items as i}
<div class="grid grid-cols-4 text-xl">
- <div class="mr-auto grow col-span-2"><span class="mr-2">{i.quantity}</span> {i.name}</div>
+ <div class="mr-auto grow col-span-2">
+ <span class="mr-2">{i.quantity}</span>
+ {i.name}
+ </div>
<div class="font-semibold text-right">
{f(i.price * i.quantity, currency)}
</div>
@@ -181,7 +183,6 @@
</div>
{/if}
-
<button
type="button"
class="flex gap-2 text-center break-all rounded-2xl hover:opacity-80 py-5 px-6 w-full mx-auto justify-center border bg-black text-white text-xl whitespace-nowrap"
@@ -193,7 +194,9 @@
</div>
</button>
- <div class="w-full flex justify-center gap-2 flex-wrap text-secondary text-xl">
+ <div
+ class="w-full flex justify-center gap-2 flex-wrap text-secondary text-xl"
+ >
<a href={link} class="w-full">
<button
class="w-full flex justify-center rounded-2xl border py-5 px-6 hover:opacity-80"
@@ -226,7 +229,6 @@
<!-- > -->
</div>
-
<div class="flex justify-around text-secondary">
<button
class="hover:bg-primary my-auto flex gap-1 sm:gap-2 py-3 px-2 sm:px-5 w-full justify-center"
diff --git a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
index 02a896b2..10fbb239 100644
--- a/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
+++ b/src/routes/(app)/[username]/invoice/[id]/tip/+page.svelte
@@ -61,6 +61,7 @@
let {
amount,
hash,
+ items,
type,
rate,
received,
@@ -82,6 +83,7 @@
({
amount,
hash,
+ items,
type,
received,
prompt,
@@ -116,6 +118,7 @@
<input type="hidden" name="prompt" value="false" />
<input type="hidden" name="type" value={type} />
<input type="hidden" name="hash" value={hash} />
+ <input type="hidden" name="items" value={items} />
<input type="hidden" name="request_id" value={invoice.request?.id} />